﻿/*
 * Created by SharpDevelop.
 * User: IEscarro
 * Date: 9/8/2009
 * Time: 10:10 AM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using Buaya.Model.Dao.Interface;
using System.Data;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Configuration;

namespace Buaya.Model.Dao.Access
{
	/// <summary>
	/// Description of AccessEmployeeDao.
	/// </summary>
	public class AccessEmployeeDao : IEmployeeDao
	{
		public AccessEmployeeDao()
		{
		}
		
		public void SaveOrUpdate(Employee e)
		{
			throw new NotImplementedException();
		}
		
		public void Delete(Employee e)
		{
			throw new NotImplementedException();
		}
		
		public Employee ReadByPk(int id)
		{
			throw new NotImplementedException();
		}
		
		public Employee ReadById(string id)
		{
			throw new NotImplementedException();
		}
		
		public IList<Employee> FindAll()
		{
			throw new NotImplementedException();
		}
		
		public DataSet FindAllDS()
		{
			DataSet ds = new DataSet();
			OleDbConnection conn = new OleDbConnection(ConfigurationManager.ConnectionStrings["oledbConnection"].ConnectionString);
			OleDbDataAdapter da = new OleDbDataAdapter("select * from company", conn);
			da.Fill(ds, "company");
			da = new OleDbDataAdapter("select * from employees", conn);
			da.Fill(ds, "employees");
			return ds;
		}
	}
}
